package com.hxkj.client.service;

import com.hxkj.domain.po.SysUser;
import com.hxkj.domain.result.RequestParameterDataStrcut;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * created by kezhijie on 2018/8/31 10:38.
 * email to kezhijie@hxoss.com
 */
@FeignClient(name = "cms-user-center")
public interface ValidateCodeServiceClient extends BaseClient {

    /**
     * 发送短信验证码
     * @param sysUser
     * @return
     */
    @RequestMapping(value = "/validatecode/sendcode", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct sendCode(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/validatecode/registercode", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct registercode(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/validatecode/verifyUser", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct verifyUser(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/validatecode/redeemByPhone", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct redeemByPhone(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/validatecode/redeemByEmail", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct redeemByEmail(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/validatecode/verifyCode", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct verifyCode(@RequestBody RequestParameterDataStrcut<SysUser, String , String> requestParameterDataStrcut);

    @RequestMapping(value = "/validatecode/sendNewEmailVaildateCode", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct sendNewEmailVaildateCode(@RequestBody String email);

    @RequestMapping(value = "/validatecode/modifyNewEmail", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct modifyNewEmail(@RequestBody RequestParameterDataStrcut<String, String, String> requestParameterDataStrcut);
}
